var = input('>>>')
wal = int(var)
if wal >= 1000:
    if wal >= 10000:
        print(5)
    else:
        print(4)
else:
    if wal >= 100:
        print(3)
    elif wal >= 10:
        print(2)
    else:
        print(1)
